//
// Created by Administrator on 2025/9/18.
//

#ifndef C___LEARN_MYSTRING_H
#define C___LEARN_MYSTRING_H

#include<stddef.h>
#include<iostream>

class MyString{
public:
    //  构造函数
    MyString(const char *str = NULL);
    //  拷贝构造
    MyString(const MyString &other);
    //  =运算符
    MyString & operator = (const MyString & another);
    //  +运算符
    MyString operator + (const MyString & other);

    bool operator == (const MyString & other);
    bool operator > (const MyString & other);
    bool operator < (const MyString & other);

    char & operator [](int index);

    void Display();

    virtual ~MyString();

private:
    char * _str;
};

#endif //C___LEARN_MYSTRING_H
